<ui:component xmlns="http://www.w3.org/1999/xhtml"
              xmlns:ui="http://java.sun.com/jsf/facelets"
              xmlns:composite="http://java.sun.com/jsf/composite" xmlns:h="http://java.sun.com/jsf/html"
              xmlns:p="http://primefaces.org/ui">

    <composite:interface>
        <composite:attribute name="value" required="true"/>
        <composite:attribute name="maxlength" required="false" default="120"/>
    </composite:interface>

    <composite:implementation>
        <p:inputTextarea id="textarea" rows="5" cols="25" counter="counter" maxlength="#{cc.attrs.maxlength}"
                         counterTemplate="{0} characters remaining." autoResize="false"
                         value="#{cc.attrs.value}"/>

        <div class="clear"/>
        <h:outputText id="counter"/>
    </composite:implementation>

</ui:component>
